package cn.edu.zafu.bigdata.YinMingyan.chapter05;

import java.util.Arrays;
import java.util.List;

/**
 * Test class for the FindMax utility class.
 */
public class FindMaxTest {

    /**
     * Tests the findMax method with a list of integers.
     */
    public static void testFindMaxWithIntegers() {
        List<Integer> integerList = Arrays.asList(1,2,3,4,5,6,7,8,9);
        Integer maxInteger = FindMax.findMax(integerList);
        System.out.println("最大的整数是: " + maxInteger);
    }

    /**
     * Tests the findMax method with a list of strings.
     */
    public static void testFindMaxWithStrings() {
        List<String> stringList = Arrays.asList("banana", "apple", "orange", "mango", "lemon","strawberry");
        String maxString = FindMax.findMax(stringList);
        System.out.println("最大的字符串是: " + maxString);
    }

    public static void main(String[] args) {
        testFindMaxWithIntegers();
        testFindMaxWithStrings();
    }
}